import axios from '@/utils/request.js'

/**
 * 登录接口
 * @param {*} param0 手机号+密码对象
 * @returns promise对象
 */
export const loginAPI = ({ mobile, password }) =>
  axios({
    url: '/sys/login',
    method: 'POST',
    data: {
      mobile,
      password
    }
  })

/**
 * 获取-用户基本资料
 * @returns 用户基本资料
 */
export const getProfileAPI = () =>
  axios({
    url: '/sys/profile',
    method: 'POST'
  })

/**
 * 获取-员工基本信息
 * @param {*} id
 * @returns
 */
export const getUserInfoAPI = (id) =>
  axios({
    url: `/sys/user/${id}`,
    method: 'GET'
  })
